1. Field of the Invention
The present invention relates to a program product storing a program for controlling image processing in a video game etc., a method of image processing, and an image processing system.
2. Description of the Related Art
In recent years, three-dimensional games (3D games) have garnered attention as types of video games. In 3D games, three-dimensional objects for display are arranged in a virtual three-dimensional space. The arranged three-dimensional objects are displayed on a screen by perspective transformation. The three-dimensional objects includes a player character operated by the player, an enemy character, and other objects displayed on the screen during the progress of the game.
In such a 3D game, the three-dimensional objects for display are comprised of combinations of polygons, which are triangular, quadrilateral, and other polylateral planes. That is, the surface of the object for display is expressed as a combination of triangular and other planes.
The form of a three-dimensional object displayed on the screen during the progress of the game changes in various ways in accordance with the state of progress of the game, input operation, etc. For example, when displaying the state of movement of a man-shaped character, the form of the three-dimensional object changes in accordance with movement of the arms and legs or twisting of the torso, etc. Along with the changes in the form of the three-dimensional object, the state of the character walking or running is expressed.
When the form of the three-dimensional object changes in this way, the positions, shapes, etc. of the polygons comprising the three-dimensional object sequentially change. Therefore, computations relating to the positions or shapes of the polygons of the object for display are sequentially executed. The change in the form of the three-dimensional object is displayed based on the result of the computation.
Summarizing the problem to be solved by the invention, when the form of the three-dimensional object changes, there is a possibility of movement, rotation, twisting, torsion, elongation, contraction, deformation, etc. occurring in the quadrilateral polygon. At that time, the expression of the location using the quadrilateral polygon is liable to become unnatural due to factors such as the position of the view point.
For example, consider the case where a location on the back of a man-shaped character from a shoulder to an armpit is comprised of a single quadrilateral polygon. When the character moves its arm or twists its body, part of the shoulder which should inherently not be missing may be displayed missing depending on the method of twisting or method of torsion of the quadrilateral polygon.
Unnatural display of the three-dimensional object in this way gives rise to a strange feeling in the mode of display of the change of form of the three-dimensional object. To prevent such a situation from occurring, it is important to specially devise a method of drawing (method of displaying) the polygons comprising the three-dimensional object.
An object of the present invention is to enable the mode of change of form of a three-dimensional object to be displayed without a strange feeling.
According to a first aspect of the present invention, there is provided a computer readable program product for storing a game program, which product stores a program making the computer draw a three-dimensional object comprised of a plurality of polygons including quadrilateral polygons, judge whether a quadrilateral polygon, divided into two triangular planes with a straight line connecting the pair of facing vertexes forming a ridge line, is formed in a concave or convex shape about the ridge line, and change the ridge line to a straight line connecting the other pair of facing vertexes of the quadrilateral polygon when it is judged that the quadrilateral polygon is formed in a concave or convex shape.
According to a second aspect of the present invention, there is provided a computer readable program product for storing a game program, which product stores a program making the computer draw a game character comprised of a plurality of polygons including quadrilateral polygons, judge whether a quadrilateral polygon, divided into two triangular planes with a straight line connecting the pair of facing vertexes forming a ridge line, is formed in a concave or convex shape about the ridge line when changing and drawing the form of the game character in response to an input operation of a player. The computer also changes the ridge line to a straight line connecting the other pair of facing vertexes of the quadrilateral polygon when it is judged that the quadrilateral polygon is formed in a concave or convex shape, and divides the quadrilateral polygon by the changed straight line to generate two independent triangular polygons.
According to a third aspect of the present invention, there is provided a method of image processing comprising drawing a three-dimensional object comprised of a plurality of polygons including quadrilateral polygons, judging whether a quadrilateral polygon, divided into two triangular planes with a straight line connecting the pair of facing vertexes forming a ridge line, is formed in a concave or convex shape about the ridge line, and changing the ridge line to a straight line connecting the other pair of facing vertexes of the quadrilateral polygon when it is judged that the quadrilateral polygon is formed in a concave or convex shape.
According to a fourth aspect of the present invention, there is provided a method of image processing comprising drawing a game character comprised of a plurality of polygons including quadrilateral polygons, judging whether a quadrilateral polygon, divided into two triangular planes with a straight line connecting the pair of facing vertexes forming a ridge line, is formed in a concave or convex shape about the ridge line when changing and drawing the form of the game character in response to an input operation of a player, changing the ridge line to a straight line connecting the other pair of facing vertexes of the quadrilateral polygon when it is judged that the quadrilateral polygon is formed in a concave or convex shape, and dividing the quadrilateral polygon by the changed straight line to generate two independent triangular polygons.
According to a fifth aspect of the present invention, there is provided a mechanism comprising a computer for controlling a program and a program product storing a program for making the computer control the game. The program makes the computer draw a three-dimensional object comprised of a plurality of polygons including quadrilateral polygons, judge whether a quadrilateral polygon, divided into two triangular planes with a straight line connecting the pair of facing vertexes forming a ridge line, is formed in a concave or convex shape about the ridge line, and change the ridge line to a straight line connecting the other pair of facing vertexes of the quadrilateral polygon when it is judged that the quadrilateral polygon is formed in a concave or convex shape.
According to a sixth aspect of the present invention, there is provided a mechanism comprising a computer for controlling a program and a program product storing a program for making the computer control the game. The program makes the computer draw a game character comprised of a plurality of polygons including quadrilateral polygons, judge whether a quadrilateral polygon, divided into two triangular planes with a straight line connecting the pair of facing vertexes forming a ridge line, is formed in a concave or convex shape about the ridge line when changing and drawing the form of the game character in response to an input operation of a player, change the ridge line to a straight line connecting the other pair of facing vertexes of the quadrilateral polygon when it is judged that the quadrilateral polygon is formed in a concave or convex shape, and divide the quadrilateral polygon by the changed straight line to generate two independent triangular polygons.